<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        
        function fn2(x,y){
            console.log(x,y);
            console.log(this.b);
        } 
        function fn(f){
            // console.log(f);
            f.bind(this)(1,2)
        }

        var obj1 = {
            a:1,
            b:3,
            say:function(x,y,z){
                // console.log(x,y,z);
                console.log(this.a);
            }
        }


        var obj2 = {
            b:2,
            eat:function(fn){
                fn.apply(this,[fn2]) 
            }
        }
        obj2.eat.call(obj1,fn)
        // obj2.eat.apply(obj1,[5,6,7])
        // obj2.eat()

    </script>
</body>
</html> 